package exam;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Generate generate=new Generate();
        Scanner sc=new Scanner(System.in);
        while (true){
            String student = generate.random_student();
            System.out.println("请\"" + student + "\"回答问题：");
            System.out.println("请输入回答的题目数量：");

            int count= sc.nextInt();

            Problem[] generate1 = generate.generate(count);
            for (Problem problem : generate1) {
                System.out.println(problem.getId()+"."+problem.getContent());
            }
            System.out.println("是否继续y/n");
            String s=sc.next();
            if (!s.equals("y")){
                System.out.println("撒有啦啦~~~~~~~");
                break;
            }
        }
    }
}
